package com.wp.design.structural.composite;

public class Course extends CatalogComponent {
	private String name;
	private Double price;

	public Course(String name, Double price) {
		this.name = name;
		this.price = price;
	}

	@Override
	public String getName() {
		return this.name;
	}

	@Override
	public Double gePrice(CatalogComponent catalogComponent) {
		return this.price;
	}

	@Override
	public void print() {
		System.out.println("课程名称:"+this.name+"课程价格:"+this.price);
	}
}
